<template>
	<view>
		<z-paging ref="paging" v-model="list" @query="queryList">
			<view v-for="(m, i) in list" :key="i" class="m-5 p-5 bg-primary flex items-center justify-center"
				@click="goWebView">
				<text>{{ m }}</text>
			</view>
		</z-paging>
	</view>
</template>

<script>
export default {
	data() {
		return {
			title: 'Hello',
			list: [],
		}
	},
	onLoad() {

	},
	methods: {
		queryList(pageNum, pageSize) {
			try {
				this.$loading()
				setTimeout(() => {
					this.$refs.paging.complete([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
					this.$loading(false)
				}, 2000)
			} catch (error) {
				this.$refs.paging.complete(false)
			}
		},
		goWebView() {
			this.$webview.open({
				path: 'https://www.baidu.com/',
				query: {
					title: '百度一下，你就知道',
				}
			})
		}

	}
}
</script>

<style>

</style>